#include <stdint.h>
#include <stdio.h>
#include "mini-printf.h"

#define MAX_UART_BUF (100)
#define dbg uart_printf 
void uart_printf(char *fmt, ...)
{
    static char consle_buf[MAX_UART_BUF];
    int32_t len = 0;
    va_list ap;
    va_start(ap, fmt);
    len = kvsnprintf(consle_buf, MAX_UART_BUF, fmt, ap);
    va_end(ap);
    if(len <= 0) {
        return;
    }
    printf("%s", consle_buf);
}


int main(void) {
	//dbg("hello\r\n");
    dbg("%100d\r\n", -2147483647);
    dbg("%d\r\n", -2147483647);
    //dbg("%x\r\n", 0xFFFFFFFF);
	
}